#version 120

varying	vec3 l;
varying	vec3 v;
varying	vec3 n;

uniform	vec4	lightPos;
uniform	vec4	eyePos;

void main(void)
{
    vec3 p = vec3(gl_ModelViewMatrix * gl_Vertex);      // transformed point to world space

    l = normalize(vec3(lightPos) - p);                  // vector to light source
    v = normalize(vec3(eyePos) - p);                    // vector to the eye
    n = normalize(gl_NormalMatrix * gl_Normal);         // transformed n
	
	gl_TexCoord[0] = gl_MultiTexCoord0;
    gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
}